package com.dw.etl.core.bean.vo;

import java.util.ArrayList;
import java.util.List;

/**
 * @author GuoPeng  0成功  1失败
 * @Title: LayMsg
 * @Description: layUi返回通用类
 * @date 2019/5/7 22:57
 */
public class LayMsg {

    private Integer code;
    private String msg;
    private Object count;
    private List  data=new ArrayList();

    public   static   LayMsg  success(){
        LayMsg  layMsg= new LayMsg();
        layMsg.setCode(0);
        layMsg.setMsg("success");
        return   layMsg;
    }

    public  static   LayMsg  fail(){
        LayMsg  layMsg= new LayMsg();
        layMsg.setCode(1);
        layMsg.setMsg("fail");
        return   layMsg;
    }

    public   LayMsg addData(List Datalist){
        this.data= Datalist;
        return this;
    }

    public   LayMsg addCount(Object count){
        this.count=count;
        return this;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getCount() {
        return count;
    }

    public void setCount(Object count) {
        this.count = count;
    }

    public List getData() {
        return data;
    }

    public void setData(List data) {
        this.data = data;
    }

}
